{% extends 'ShopAdminBundle::base.html.twig'%}

{% if not tb_head is defined %}
    {% set tb_head=['#'] %}
{% endif %}

{% block main_content %}
    <div class="box">
        <div class="box-body">
            <div id="box_list" class="form-inline">
                <div class="row">
                    <div class="col-md-12 col-sm-12">
                        <table class="records_list table table-bordered table-hover">
                            <thead>

                            <tr>
                                {% for key in tb_head %}
                                    <th>{{ key }}</th>
                                {% endfor %}
                                <th></th>
                            </tr>

                            </thead>

                            <tbody>
                            {% for entity in entities %}
                                <tr>
                                    {% block item_body %}

                                    {% endblock %}

                                    <td>
                                        <ul class="op_icon" data-bundle="{{ bundle_name | default('') }}">
                                            <li>
                                                <a href="{{ path(edit_url, { 'id': entity.id }) }}">
                                                    <i class="fa fa-edit"></i> 编辑</a>
                                            </li>
                                            <li>
                                                <a class="btn_del" href="javascript:void(0);" data-eid="{{ entity.id }}">
                                                    <i class="fa fa-trash red"></i> 删除</a>
                                            </li>
                                        </ul>
                                    </td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </div>
                </div>

                {% include 'ShopAdminBundle::paginator.html.twig' %}

            </div>
        </div>
    </div>

{% endblock %}

